package br.mikhas.db.model.factory;

import br.mikhas.db.model.Field;

public class DataBaseModelField extends Field {

	DataBaseModelField(java.lang.reflect.Field field) {
		this.name = field.getName();
		this.type = field.getType();
	}

	/**
	 * Sets String field max length
	 * 
	 * @param legth
	 *            the desired max length
	 */
	void setLength(int length) {
		this.length = length;
	}

	/**
	 * Sets if this field belongs to the model index
	 */
	void setIndex(boolean index) {
		this.index = index;
	}

	/**
	 * Sets if this field is an auto-numbered sequence
	 */
	void setSequential(boolean seq) {
		this.sequential = seq;
	}
}
